package com.lagou.rocket.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lagou.rocket.demo.mapper.CourseMapper;
import com.lagou.rocket.demo.po.Course;
import com.lagou.rocket.demo.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseServiceImpl implements CourseService {

    @Autowired
    private CourseMapper courseMapper;

    @Override
    public List<Course> listCourses() {

        final List<Course> courses = courseMapper.selectList(new QueryWrapper<>());

        return courses;
    }
}
